package com.shelpe.services.lexicon.repository.mongo;

import java.util.List;

import org.springframework.data.domain.Sort;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.shelpe.services.lexicon.constants.Status;
import com.shelpe.services.lexicon.entity.AdgroupRecord;

public interface AdgroupRecordRepository extends PagingAndSortingRepository<AdgroupRecord, String> {

	List<AdgroupRecord> findByAdgroupID(long adgroupID);
	List<AdgroupRecord> findByAdgroupIDAndRecommendCountGreaterThanOrderByPostTimeDesc(long adgroupID, int recommendCount);
	List<AdgroupRecord> findByAdgroupID(long adgroupID, Sort sort);
	List<AdgroupRecord> findByAdgroupIDAndStatusIn(long adgroupID, List<Status> statuses, Sort sort);
	
	List<AdgroupRecord> findTop100ByMergedIsNullOrderByPostTimeDesc();
}
